package com.demo.afternoon;

/**
 * @ClassName 鞋子
 * @Description TODO
 * @Author tianqinglong
 * @Date 16:29 2022/7/5
 * @Version 1.0
 **/
public class 鞋子 {
    public static void main(String[] args) {
        NativeShoes nativeShoes = new NativeShoes("匡威",100);
        System.out.println(nativeShoes.discount());
    }
}

class Shoes{
    private String brand;
    private int price;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public Shoes(String brand, int price) {
        this.brand = brand;
        this.price = price;
    }

    @Override
    public String toString() {
        return "Shoes{" +
                "brand='" + brand + '\'' +
                ", price=" + price +
                '}';
    }

    public int discount(){
        return (int)(getPrice()*0.9);
    }

}
class NativeShoes extends Shoes{

    public NativeShoes(String brand, int price) {
        super(brand, price);
    }

    @Override
    public int discount() {
        return (int)(this.discount()*0.5);
    }
}
